package jy.game;

import jy.game.components.role.JyRole;
import jy.game.components.role.JyRoleGrowTemplate;

public class AttributeHelper {
    // Token: 0x040003D7 RID: 983
    private JyRole             owner;
    // Token: 0x040003D8 RID: 984
    private JyRoleGrowTemplate template;

    // Token: 0x060004B1 RID: 1201 RVA: 0x000047C8 File Offset: 0x000029C8
    public AttributeHelper(JyRole Owner) {
        this.owner = Owner;
    }

    // Token: 0x060004B2 RID: 1202 RVA: 0x000047D7 File Offset: 0x000029D7
    public AttributeHelper(JyRoleGrowTemplate template) {
        this.template = template;
    }

    // Token: 0x17000107 RID: 263
    public int get(String key) {

        if (this.owner != null) {
            switch (key) {
                case "hp":
                    return this.owner.hp;
                case "maxhp":
                    return this.owner.maxhp;
                case "mp":
                    return this.owner.mp;
                case "maxmp":
                    return this.owner.maxmp;
                case "gengu":
                    return this.owner.gengu;
                case "bili":
                    return this.owner.bili;
                case "fuyuan":
                    return this.owner.fuyuan;
                case "shenfa":
                    return this.owner.shenfa;
                case "dingli":
                    return this.owner.dingli;
                case "wuxing":
                    return this.owner.wuxing;
                case "quanzhang":
                    return this.owner.quanzhang;
                case "jianfa":
                    return this.owner.jianfa;
                case "daofa":
                    return this.owner.daofa;
                case "qimen":
                    return this.owner.qimen;
                case "female":
                    return this.owner.femaleValue;
                case "wuxue":
                    return this.owner.wuxue();
                default:
                    return -1;
            }

        }
        if (this.template != null) {
            switch (key) {
                case "hp":
                    return this.template.hp;
                case "mp":
                    return this.template.mp;
                case "gengu":
                    return this.template.gengu;
                case "bili":
                    return this.template.bili;
                case "fuyuan":
                    return this.template.fuyuan;
                case "shenfa":
                    return this.template.shenfa;
                case "dingli":
                    return this.template.dingli;
                case "wuxing":
                    return this.template.wuxing;
                case "quanzhang":
                    return this.template.quanzhang;
                case "jianfa":
                    return this.template.jianfa;
                case "daofa":
                    return this.template.daofa;
                case "qimen":
                    return this.template.qimen;
                case "wuxue":
                    return this.template.wuxue;
                default:
                    return -1;
            }
        }
        return -1;
    }
}